import { createRouter, createWebHistory } from "vue-router";
import Home from "../components/HelloWorld.vue";
import Login from "@/components/sys/Login.vue";
import Main from "@/components/sys/Main.vue";
import Add from "@/components/lottery/Add.vue";
import List from "@/components/lottery/List.vue";
import Prize from "@/components/lottery/Prize.vue";

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/login",
    component: Login,
  },
  {
    path: "/main",
    component: Main,
    children: [
      {
        path: "/list",
        component: List,
      },
      {
        path: "/lottery",
        component: Add,
      },
      {
        path: "/prize",
        component: Prize,
      },
    ],
  },

  // 添加更多路由...
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
